<template>
  <view
    :style="'direction:' + $t('dir')"
    :class="$t('dir') == 'rtl' ? 'rtl' : 'ltr'"
  >
    <!-- مۇستەقىل قايتىش كۇنۇپكىسى -->
    <view
      class="fixed-back-btn"
      @click="goBack"
      :style="{ top: statusBarHeight + 'px' }"
    >
      <u-icon name="arrow-left" color="#333" size="20"></u-icon>
    </view>
    <view class="no-image" v-if="swpImages == null"  :style="{ height: headerArea.status_height + 50 + 'px' }">

    </view>
    <!-- 滚动时显示的 navbar -->
    <view class="navbar-container" v-if="showNavbar || swpImages == null" >
      <view
        class="status-bar"
        :style="{ height: headerArea.status_height + 'px' }"
      ></view>
      <view class="navbar-content">
        <view class="fixed-back-btn" @click="goBack">
          <u-icon name="arrow-left" color="#333" size="20"></u-icon>
        </view>
        <text class="title">{{
          $t("dir") == "rtl" ? "تەپسىلاتى" : "详情"
        }}</text>
      </view>
    </view>
    <!-- <navbar :title="$t('info')" /> -->
    <!-- 轮播图 -->
    <view class="swiper-container" v-if="swpImages != null" >
      <swiper
        class="swiper dir-ltr"
        circular
        :autoplay="true"
        :interval="3000"
        @change="handleSwiperChange"
        :current="currentIndex"
      >
        <swiper-item v-for="item in swpImages" :key="item">
          <image
            :src="baseUrl + '/' + item"
            mode="aspectFill"
            class="swiper-img"
            @click="previewImage(index)"
          />
        </swiper-item>
      </swiper>

      <!-- 顶部渐变遮罩 -->
      <view class="gradient-overlay"></view>

      <!-- 缩略图预览 -->
      <view class="thumbnail-container">
        <image
          v-for="(item, index) in swpImages"
          :key="index"
          :src="baseUrl + '/' + item"
          class="thumbnail"
          :class="{ active: currentIndex === index }"
          mode="aspectFill"
          @click="handleThumbnailClick(index)"
        />
      </view>
    </view>

    <view class="main">
      <!-- ماۋزۇ قىسمى -->
      <view class="title-section">
        <text class="title">{{ $t("dir") == "rtl" ? detail.title : detail.title_cn }}</text>
        <view class="time-info">
          <text class="time">{{ detail.updated_at }}</text>
          <text class="time"
            >{{ detail.visits || 0 }} {{ $t("dir") == "rtl" ? "قېتىم كۆرۈلدى" : "次浏览" }}</text
          >
        </view>
      </view>

      <!-- ئاساسىي ئۇچۇرلار -->
      <view class="basic-info">
        <view class="info-item">
          <text class="value">{{ getRegionName(detail.address) }}</text>
          <text class="label">{{ $t("dir") == "rtl" ? "رايون" : "地区" }}</text>
        </view>
        <view
          class="info-item"
          v-if="
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ $t("dir") == "rtl" ? detail.full_address : detail.full_address_cn  || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ئادرېس" : "地址"
          }}</text>
        </view>
        <!-- قوبۇل قىلىش ئۇچۇرلىرى -->
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 34 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.job_orun }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "قوبۇل قىلىدىغان ئورۇن" : "接收地点"
          }}</text>
        </view>
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 34 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.job_type }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "قوبۇل قىلىدىغان تۈر" : "接收类型"
          }}</text>
        </view>
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 34 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value"
            >{{ detail.person_num }} {{ $t("dir") == "rtl" ? "نەپەر" : "人" }}</text
          >
          <text class="label">{{
            $t("dir") == "rtl" ? "ئادەم سانى" : "人数"
          }}</text>
        </view>
        <!-- ئەسلىھە ئۇچۇرلىرى -->
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 34 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ getFacilityName(detail.facility) }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ئەسلىھە تۈرلىرى" : "设施类型"
          }}</text>
        </view>
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.number_floors || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "قەۋەت سانى" : "楼层"
          }}</text>
        </view>
        <!-- قانچە مو قانچە پۇڭ،لى'  -->
        <view
          class="info-item"
          v-if="
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.geometry || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "كۆلىمى" : "面积"
          }}</text>
        </view>
        <!-- 平方 -->
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value"
            >{{ detail.square || "--"}} {{ $t("dir") == "rtl" ? "كۋادرات" : "平方" }}</text
          >
          <text class="label">{{
            $t("dir") == "rtl" ? "كۆلىمى" : "面积"
          }}</text>
        </view>
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.room || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ياتاق سانى" : "卧室数量"
          }}</text>
        </view>
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.hall || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "زال سانى" : "客厅数量"
          }}</text>
        </view>
        <view class="info-item" v-if="u_id == 34">
          <text class="value"
            >{{ detail.transfer_year }} {{ $t("dir") == "rtl" ? "يىل" : "年" }}</text
          >
          <text class="label">{{
            $t("dir") == "rtl" ? "ئۆتكۈزۈش مۇددىتى" : "转让期限"
          }}</text>
        </view>
        <view class="info-item" v-if="u_id == 40">
          <text class="value">{{
            getTransferTypeName(detail.transfer_type)
          }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ھۆددىگە بېرىش تۈرى" : "转让类型"
          }}</text>
        </view>
        <view
          class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ getFitmentName(detail.fitment) }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "بېزىلىشى" : "装修"
          }}</text>
        </view>
        <view class="info-item"
         v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          ">
          <text class="value">{{ getBankLoanName(detail.loan) }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "بانكا قەرزى" : "银行贷款"
          }}</text>
        </view>
        <view class="info-item"
         v-if="
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 41
          ">
          <text class="value">{{ detail.price === 'يۈزتۇرانە' || detail.price === '面议' ? ($t("dir") == "rtl" ? 'يۈزتۇرانە' : '面议') : detail.price || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "باھاسى" : "价格"
          }}</text>
        </view>
        <view class="info-item"  v-if="u_id == 25" >
          <text class="value">{{ detail.house_num || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ئۆي سانى" : "房屋数量"
          }}</text>
        </view>
        <view class="info-item" v-if="u_id == 24 || u_id == 25">
          <text class="value">{{ getRentTypeName(detail.rent_type) }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ئىجارە شەكلى" : "租赁方式"
          }}</text>
        </view>
        <!-- ماشىنا ئۇچۇرلىرى -->
        <view class="info-item"
         v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          ">
          <text class="value">{{ detail.car_name || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ماشىنا ماركىسى" : "车牌"
          }}</text>
        </view>
        <view class="info-item"
         v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.car_model || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ماشىنا تىپى" : "车型"
          }}</text>
        </view>
        <view class="info-item"
         v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.car_year || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ماشىنا يىلى" : "年份"
          }}</text>
        </view>
        <view class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.car_vehicle_inspection || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "يىللىق تەكشۈرۈش " : "车检时间"
          }}</text>
        </view>
          <view class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <text class="value">{{ detail.car_limits || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "سۇغۇرتا ۋاقتى" : "车保险"
          }}</text>
        </view>
        <view class="info-item"
         v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          ">
          <text class="value">{{ detail.car_fuel || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "سەرپىياتى" : "排量"
          }}</text>
        </view>
        <view class="info-item"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          ">
          <text class="value">{{
            detail.car_gear_type === 1
              ? $t("dir") == "rtl"
                ? "ئاپتوماتىك"
                : "自动挡"
              : detail.car_gear_type === 2
              ? $t("dir") == "rtl"
                ? "قول خوت"
                : "手动挡"
              : "--"
          }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ماشىنا خوت تىپى" : "变速箱类型"
          }}</text>
        </view>

        <!-- خىزمەت ئۇچۇرلىرى -->
        <view class="info-item" v-if="u_id == 8">
          <text class="value">{{ detail.age || "--" }}</text>
          <text class="label">{{ $t("dir") == "rtl" ? "يېشى" : "年龄" }}</text>
        </view>
        <view class="info-item" v-if="u_id == 8">
          <text class="value">{{
            detail.gender === 1
              ? $t("dir") == "rtl"
                ? "ئوغۇل"
                : "男"
              : detail.gender === 2
              ? $t("dir") == "rtl"
                ? "قىز"
                : "女"
              : "--"
          }}</text>
          <text class="label">{{ $t("dir") == "rtl" ? "جىنسى" : "性别" }}</text>
        </view>
        <view class="info-item" v-if="u_id == 8">
          <text class="value">{{ getDegreeName(detail.degree) }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "ئوقۇش تارىخى" : "学历"
          }}</text>
        </view>
        <view class="info-item" v-if="u_id == 8">
          <text class="value">{{ $t("dir") == "rtl" ? detail.work_experience : detail.work_experience_cn || "--" }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "خىزمەت تەجرىبىسى" : "工作经验"
          }}</text>
        </view>
        <view class="info-item" v-if="u_id == 8">
          <text class="value">{{ $t("dir") == "rtl" ? detail.profession : detail.profession_cn || "--" }}</text>
          <text class="label">{{ $t("dir") == "rtl" ? "كەسپى" : "专业" }}</text>
        </view>
        <view class="info-item" v-if="u_id == 8">
          <text class="value">{{ getWagesName(detail.wages) }}</text>
          <text class="label">{{
            $t("dir") == "rtl" ? "مائاش تەلىپى" : "薪资要求"
          }}</text>
        </view>
      </view>
      <!-- تەپسىلاتى -->
      <view class="details-info">
        <view class="title">{{
          $t("dir") == "rtl" ? "تەپسىلاتى" : "详细信息"
        }}</view>
        <text class="content">{{ $t("dir") == "rtl" ? detail.info_content : detail.info_content_cn }}</text>
      </view>
      <!-- ئالاقە ئۇچۇرلىرى -->
      <view class="contact-info" >
        <view class="info-item " v-if="detail.mobile">
          <view class="phone-container">
            <text class="value">{{ detail.mobile }}</text>
            <view class="call-button" @click="makePhoneCall(detail.mobile)">
              <u-icon name="phone" color="#fff" size="28"></u-icon>
              <text class="call-text">{{
                $t("dir") == "rtl" ? "تېلېفون قىلىش" : "拨打电话"
              }}</text>
            </view>
          </view>
          <text class="label" :style="{ textAlign: $t('dir') === 'ltr' ? 'right' : 'right' }">{{
            $t("dir") == "rtl" ? "تېلېفون نومۇرى" : "联系电话"
          }}</text>
        </view>
        <view class="info-item" v-if="detail.mobile">
          <view class="phone-container">
            <div
              class="info"
              style="
                text-align: center;
                padding: 10px;
                color: rgba(69, 93, 247, 0.8);
              "
              v-if="$t('dir') == 'rtl'"
            >
              ئالاقىلاشقاندا بۇ ئۇچۇرنى
              <text style="color: red"> "كورلا ئۇچۇر سۇپىسىدا" </text>
              كۆرگەنلىكىڭىزنى ئەسكەرتىڭ
            </div>
            <div
              class="info"
              style="
                text-align: center;
                padding: 10px;
                color: rgba(69, 93, 247, 0.8);
              "
              v-if="$t('dir') == 'ltr'"
            >
               请您联系对方时 务必告诉Ta 在
              <text style="color: red"> "库尔勒信息平台" </text>
               里看到的信息
            </div>
          </view>
        </view>
        <view class="info-item" v-if="detail.wechat_code">
          <image
            :src="baseUrl + '/' + detail.wechat_code"
            mode="aspectFit"
            class="qrcode value"
            @click="previewQRCode"
          />
          <text class="label">{{
            $t("dir") == "rtl" ? "ئۈندىدار ئىككىلىك كودى" : "微信二维码"
          }}</text>
        </view>
      </view>
      <!-- askartix -->
      <view class="container" style="margin-top: 10px">
        <view class="title text-center">{{
          $t("dir") == "rtl" ? "ئەسكەرتىش" : "温馨提示"
        }}</view>
        <view class="cell text-center" v-if="$t('dir') == 'rtl'">
          مەزكۇر ئۇچۇر،ئۇچۇر يوللىغۇچى ياكى ئۇچۇر يوللىغان شىركەتكەۋەكىللىك
          قىلىدۇ كورلا ئۇچۇر سۇپىسى بىلەن ھىچقانداق ئالاقىسى يوق ئالاقىلاشقاندا
          ئاگاھ بولىشىڭىزنى ئەسكەرتىمىز،سىزگە سەۋەپسىزلا پۇل تاپشۇرۇڭ زاكالەت
          پۇلى تۆلەڭ دىگەنلەرنىڭ ھەممىسى بىردەك ئالدامچىدۇر
        </view>

        <view class="cell text-center" v-if="$t('dir') == 'ltr'">
    此信息属于信息发布者个人或公司单位，与平台没有关系 。请你联系时务必警惕 ，请勿随便转账 付款 交定金 。 无缘无故收定金的都是骗子，请防范
        </view>
      </view>
    </view>
    <div class="tab-bar" :class="{ hidden: !showNavbar }">
      <div class="tab-item" @click="toggleFavorite">
        <u-icon
          :name="isFavorite ? 'star-fill' : 'star'"
          :color="isFavorite ? '#FFD700' : '#666'"
          size="40"
        ></u-icon>
        <text class="tab-text">{{
          $t("dir") == "rtl"
            ? isFavorite
              ? "ساقلاندى"
              : "ساقلاش"
            : isFavorite
            ? "已收藏"
            : "收藏"
        }}</text>
      </div>
      <div class="tab-item share-btn" @click="handleShare">
        <u-icon name="share-fill" color="#fff" size="40"></u-icon>
        <button class="share-button" open-type="share"></button>
      </div>
      <div class="tab-item contact-btn" @click="makePhoneCall(detail.mobile)">
        <u-icon name="phone-fill" color="#fff" size="40"></u-icon>
      </div>
    </div>
  </view>
</template>
<script>
import config from "@/utils/config";
import share from "../../utils/share";
export default {
  data() {
    return {
      shareid:null,
      u_id: null,
      detail: {},
      baseUrl: config.baseUrl,
      swpImages: [],
      statusBarHeight: 0,
      showNavbar: false,
      headerArea: {
        status_height: 0,
      },
      currentIndex: 0,
      // رايون تىزىملىكى
      orunList: [
        {
          Code: "658410",
          labelCn: "库尔勒市",
          label: "كورلا شەھىرى",
          value: 1,
        },
        {
          Code: "658410",
          labelCn: "轮台县",
          label: "بۈگۈر",
          value: 2,
        },
        {
          Code: "658410",
          labelCn: "尉犁",
          label: "لوپنۇر",
          value: 3,
        },
        {
          Code: "658410",
          labelCn: "若羌县",
          label: "چاقىلىق",
          value: 4,
        },
        {
          Code: "658410",
          labelCn: "且末县",
          label: "چەرچەن",
          value: 5,
        },
        {
          Code: "658410",
          labelCn: "焉耆",
          label: "قاراشەھەر",
          value: 6,
        },
        {
          Code: "658410",
          labelCn: "和静县",
          label: "خېجىڭ",
          value: 7,
        },
        {
          Code: "658410",
          labelCn: "和硕县",
          label: "خوشۇت",
          value: 8,
        },
        {
          Code: "658410",
          labelCn: "博湖",
          label: "باغراش",
          value: 9,
        },
      ],
      // ئەسلىھە تىزىملىكى
      aslihaList: [
        {
          labelCn: "有设施",
          label: "ئەسلىھەلىرى بار",
          value: 1,
        },
        {
          labelCn: "无设施",
          label: "قۇرۇق دۇكان",
          value: 2,
        },
      ],
      // ھۆددىگە بېرىش تۈرى تىزىملىكى
      hoddiList: [
        {
          labelCn: "转让",
          label: "ھۆددىگە بېرىش",
          value: 1,
        },
        {
          labelCn: "过户",
          label: "تېگىدىن ئۆتۈنۈپ بېرىش",
          value: 2,
        },
      ],
      // بېزەلگەن ھالىتى تىزىملىكى
      bezakList: [
        {
          labelCn: "无装修",
          label: "بېزەلمىگەن",
          value: 1,
        },
        {
          labelCn: "简单装修",
          label: "ئاددى بېزەلگەن",
          value: 2,
        },
        {
          labelCn: "普通装修",
          label: "ئوتتۇراھال بېزەلگەن",
          value: 3,
        },
        {
          labelCn: "精装",
          label: "ئالاھىدە بېزەلگەن",
          value: 4,
        },
      ],
      // بانكا قەرزى تىزىملىكى
      bankaList: [
        {
          labelCn: "可以贷款",
          label: "بولىدۇ",
          value: 1,
        },
        {
          labelCn: "不能贷款",
          label: "بولمايدۇ",
          value: 2,
        },
      ],
      // ئىجارە شەكلى تىزىملىكى
      ejaraList: [
        {
          labelCn: "月租",
          label: "ئايلىق",
          value: 1,
        },
        {
          labelCn: "年租",
          label: "يىللىق",
          value: 2,
        },
      ],
      // ماشىنا ماي تۈرى تىزىملىكى
      gazList: [
        {
          labelCn: "纯汽油",
          label: "ساپ مايلىق",
          value: 1,
        },
        {
          labelCn: "带气管",
          label: "گاز ئورۇنتىلغان",
          value: 2,
        },
        {
          labelCn: "采油",
          label: "سەلەركە",
          value: 3,
        },
        {
          labelCn: "纯电",
          label: "ساپ توكلۇق",
          value: 4,
        },
        {
          labelCn: "油电混动",
          label: "توك مايلق",
          value: 5,
        },
      ],
      // مائارىپ دەرىجىسى تىزىملىكى
      okusList: [
        { value: 0, label: "ئوقۇمىغان", labelCn: "无" },
        { value: 1, label: "باشلانغۇچ", labelCn: "小学" },
        { value: 2, label: "تولۇقسىز", labelCn: "初中" },
        { value: 3, label: "تولۇق ئوتتۇرا", labelCn: "高中" },
        { value: 4, label: "ئالى مەكتەپ", labelCn: "大学" },
      ],
      // مائاش تەلىپى تىزىملىكى
      maaxList: [
        {
          labelCn: "面议",
          label: "يۈزتۇرانە",
          value: 1,
        },
        {
          labelCn: "3000以下",
          label: "3000دىن تۆۋەن",
          value: 2,
        },
        {
          labelCn: "3000-5000",
          label: "3000-5000",
          value: 3,
        },
        {
          labelCn: "5000-8000",
          label: "5000-8000",
          value: 4,
        },
        {
          labelCn: "8000-10000",
          label: "8000-10000",
          value: 5,
        },
        {
          labelCn: "10000以上",
          label: "10000دىن يۇقىرى",
          value: 6,
        },
      ],
      isFavorite: false,

      lastScrollTop: 0,
    };
  },
  onLoad(options) {
    // 获取状态栏高度
    const systemInfo = uni.getSystemInfoSync();
    this.headerArea.status_height = systemInfo.statusBarHeight;
    this.statusBarHeight = systemInfo.statusBarHeight;
    const id = options.id || "";
    this.shareid = id;
    if (id) {
      this.getDetailData(id);
    }
    // ساقلانغان ھالىتىنى يۈكلەش
    this.isFavorite = this.detail.collectionType || false;
  },
  onShareAppMessage(res) {
      return {
        title: this.detail.title,
        path: '/pages/info/show?id=' + this.shareid,
        imageUrl: this.detail.avatar,
      };
    },
  onShow() {},
  onPullDownRefresh() {
    uni.stopPullDownRefresh();
  },
  onReachBottom() {},
  onPageScroll({ scrollTop }) {
    // navbar نى كۆرسىتىش/يوشۇرۇش
    this.showNavbar = scrollTop > 100;

    // tab-bar نى كۆرسىتىش/يوشۇرۇش
  },
  methods: {
    int_uid(e) {
      let u_id = null;
      var id = e._id;
      var subid = e._subid;
      if (id === 1) {
        if (subid === 1) u_id = 1;
        else if (subid === 2) u_id = 2;
        else if (subid === 3) u_id = 3;
      } else if (id === 2) {
        if (subid === 1) u_id = 4;
        else if (subid === 2) u_id = 5;
        else if (subid === 3) u_id = 6;
        else if (subid === 4) u_id = 7;
      } else if (id === 3) u_id = 8;
      else if (id === 4) {
        if (subid === 1) u_id = 9;
        else if (subid === 2) u_id = 10;
        else if (subid === 3) u_id = 11;
        else if (subid === 4) u_id = 12;
        else if (subid === 5) u_id = 13;
        else if (subid === 6) u_id = 14;
        else if (subid === 7) u_id = 15;
        else if (subid === 8) u_id = 16;
      } else if (id === 5) {
        if (subid === 1) u_id = 17;
        else if (subid === 2) u_id = 18;
        else if (subid === 3) u_id = 19;
        else if (subid === 4) u_id = 20;
      } else if (id === 6) {
        if (subid === 1) u_id = 21;
        else if (subid === 2) u_id = 22;
        else if (subid === 3) u_id = 23;
      } else if (id === 7) {
        if (subid === 1) u_id = 24;
        else if (subid === 2) u_id = 25;
      } else if (id === 8) {
        if (subid === 1) u_id = 26;
        else if (subid === 2) u_id = 27;
        else if (subid === 3) u_id = 28;
        else if (subid === 4) u_id = 29;
      } else if (id === 9) {
        if (subid === 1) u_id = 30;
        else if (subid === 2) u_id = 31;
        else if (subid === 3) u_id = 32;
      } else if (id === 10) {
        if (subid === 1) u_id = 33;
        else if (subid === 2) u_id = 34;
      } else if (id === 11) u_id = 35;
      else if (id === 12) {
        if (subid === 1) u_id = 36;
        else if (subid === 2) u_id = 37;
        else if (subid === 3) u_id = 38;
      } else if (id === 13) u_id = 39;
      else if (id === 14) u_id = 40;
      else if (id === 15) u_id = 41;
      this.u_id = u_id;
      console.log("u_id:", u_id);
    },
    async getDetailData(id) {
      if (!id) return;

      try {
        const res = await this.$uniapi("/get_information/?id=" + id);
        console.log("detailres2>>", res);

        if (res.code == 200) {
          this.detail = res.list;
          // ساقلانغان ھالىتىنى تەڭشەش
          this.isFavorite = !!this.detail.collectionType;

          var subimg = res.list.subimg;
          subimg = JSON.parse(subimg);
          this.swpImages = subimg;
          this.int_uid(res.list);
        } else {
          uni.showToast({
            title: res.msg || "مەلۇمات ئېلىش مەغلۇپ بولدى",
            icon: "none",
          });
        }
      } catch (err) {
        console.error("تەپسىلات ئېلىشتا خاتالىق:", err);
        uni.showToast({
          title: "تور خاتالىقى",
          icon: "none",
        });
      }
    },
    goBack() {
      uni.navigateBack();
    },
    handleSwiperChange(e) {
      this.currentIndex = e.detail.current;
    },
    handleThumbnailClick(index) {
      this.currentIndex = index;
    },
    previewImage(index) {
      const urls = this.swpImages.map((img) => this.baseUrl + "/" + img);
      uni.previewImage({
        urls: urls,
        current: index,
        indicator: "number",
        loop: true,
        success: () => {
          console.log("رەسىم مۇۋەپپەقىيەتلىك كۆرسىتىلدى");
        },
        fail: (err) => {
          console.error("رەسىم كۆرسىتىشتە خاتالىق كۆرۈلدى:", err);
          uni.showToast({
            title: "رەسىم كۆرسىتىش مەغلۇپ بولدى",
            icon: "none",
          });
        },
      });
    },
    previewQRCode() {
      if (!this.detail.wechat_code) {
        uni.showToast({
          title: this.$t("dir") == "rtl" ? "ئىككىلىك كود يوق" : "没有二维码",
          icon: "none",
        });
        return;
      }

      const url = this.baseUrl + "/" + this.detail.wechat_code;
      uni.previewImage({
        urls: [url],
        current: 0,
        indicator: "number",
        loop: false,
        success: () => {
          console.log("ئىككىلىك كود مۇۋەپپەقىيەتلىك كۆرسىتىلدى");
        },
        fail: (err) => {
          console.error("ئىككىلىك كود كۆرسىتىشتە خاتالىق كۆرۈلدى:", err);
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئىككىلىك كود كۆرسىتىش مەغلۇپ بولدى"
                : "二维码预览失败",
            icon: "none",
          });
        },
      });
    },
    // رايون ئىسمىنى قايتۇرىدىغان فۇنكسىيە
    getRegionName(value) {
      if (!value) return "--";
      const region = this.orunList.find((item) => item.value === value);
      if (!region) return "--";
      return this.$t("dir") == "rtl" ? region.label : region.labelCn;
    },
    // ئەسلىھە ھالىتىنى قايتۇرىدىغان فۇنكسىيە
    getFacilityName(value) {
      if (!value) return "--";
      const facility = this.aslihaList.find((item) => item.value === value);
      if (!facility) return "--";
      return this.$t("dir") == "rtl" ? facility.label : facility.labelCn;
    },
    // ھۆددىگە بېرىش تۈرىنى قايتۇرىدىغان فۇنكسىيە
    getTransferTypeName(value) {
      if (!value) return "--";
      const type = this.hoddiList.find((item) => item.value === value);
      if (!type) return "--";
      return this.$t("dir") == "rtl" ? type.label : type.labelCn;
    },
    // بېزەلگەن ھالىتىنى قايتۇرىدىغان فۇنكسىيە
    getFitmentName(value) {
      if (!value) return "--";
      const fitment = this.bezakList.find((item) => item.value === value);
      if (!fitment) return "--";
      return this.$t("dir") == "rtl" ? fitment.label : fitment.labelCn;
    },
    // بانكا قەرزى ھالىتىنى قايتۇرىدىغان فۇنكسىيە
    getBankLoanName(value) {
      if (!value) return "--";
      const loan = this.bankaList.find((item) => item.value === value);
      if (!loan) return "--";
      return this.$t("dir") == "rtl" ? loan.label : loan.labelCn;
    },
    // ئىجارە شەكلىنى قايتۇرىدىغان فۇنكسىيە
    getRentTypeName(value) {
      if (!value) return "--";
      const rentType = this.ejaraList.find((item) => item.value === value);
      if (!rentType) return "--";
      return this.$t("dir") == "rtl" ? rentType.label : rentType.labelCn;
    },
    // ماشىنا ماي تۈرىنى قايتۇرىدىغان فۇنكسىيە
    getGazName(value) {
      if (!value) return "--";
      const gaz = this.gazList.find((item) => item.value === value);
      if (!gaz) return "--";
      return this.$t("dir") == "rtl" ? gaz.label : gaz.labelCn;
    },
    // مائارىپ دەرىجىسىنى قايتۇرىدىغان فۇنكسىيە
    getDegreeName(value) {
      if (!value && value !== 0) return "--";
      const degree = this.okusList.find((item) => item.value === value);
      if (!degree) return "--";
      return this.$t("dir") == "rtl" ? degree.label : degree.labelCn;
    },
    // مائاش تەلىپىنى قايتۇرىدىغان فۇنكسىيە
    getWagesName(value) {
      if (!value) return "--";
      const wages = this.maaxList.find((item) => item.value === value);
      if (!wages) return "--";
      return this.$t("dir") == "rtl" ? wages.label : wages.labelCn;
    },
    makePhoneCall(phoneNumber) {
      if (!phoneNumber) {
        uni.showToast({
          title:
            this.$t("dir") == "rtl" ? "تېلېفون نومۇرى يوق" : "没有电话号码",
          icon: "none",
        });
        return;
      }

      uni.makePhoneCall({
        phoneNumber: phoneNumber,
        success: () => {
        },
        fail: (err) => {
          console.error("تېلېفون قىلىشتا خاتالىق كۆرۈلدى:", err);
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "تېلېفون قىلىش مەغلۇپ بولدى"
                : "拨打电话失败",
            icon: "none",
          });
        },
      });
    },
    async toggleFavorite() {
      try {
        const user = uni.getStorageSync("user");
        if (!user || !user.id) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "ئالدى بىلەن تىزىملىتىڭ" : "请先登录",
            icon: "none",
          });
          return;
        }

        const params = {
          info_id: this.detail.id,
          user_id: user.id,
          collectionType: !this.detail.collectionType,
        };

        const res = await this.$uniapi(
          "/add_collection_information_list",
          params,
          "POST"
        );

        if (res.code === 200) {
          this.detail.collectionType = !this.detail.collectionType;
          this.isFavorite = this.detail.collectionType;

          // ئۈنۈمى كۆرسىتىش
          uni.vibrateShort();
          uni.showToast({
            title: this.isFavorite
              ? this.$t("dir") == "rtl"
                ? "ساقلاندى"
                : "已收藏"
              : this.$t("dir") == "rtl"
              ? "ساقلاش ئەمەلدىن قالدۇرۇلدى"
              : "取消收藏",
            icon: "none",
          });
        } else {
          uni.showToast({
            title:
              res.msg ||
              (this.$t("dir") == "rtl" ? "مەشغۇلات مەغلۇپ بولدى" : "操作失败"),
            icon: "none",
          });
        }
      } catch (err) {
        console.error("ساقلاش مەشغۇلاتىدا خاتالىق كۆرۈلدى:", err);
        uni.showToast({
          title: this.$t("dir") == "rtl" ? "تور خاتالىقى" : "网络错误",
          icon: "none",
        });
      }
    },
    handleShare() {
      uni.share({
        provider: "weixin",
        scene: "WXSceneSession",
        type: 0,
        title: this.detail.title,
        imageUrl: this.baseUrl + '/' + this.detail.avatar,
        success: function (res) {
          console.log("ئورتاقلىشىش مۇۋەپپەقىيەتلىك بولدى:", res);
        },
        fail: function (err) {
          console.log("ئورتاقلىشىش مەغلۇپ بولدى:", err);
        }
      });
    },
  },
  
};
</script>
<style lang="scss">
.tab-bar {
  position: fixed;
  bottom: 200rpx;
  right: 0;
  height: 350rpx;
  background: rgb(26 86 222 / 11%);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  margin: 20rpx;
  padding: 10rpx;
  border-radius: 30rpx 0 0 30rpx;
  border: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 99;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.08);
  transform: translateX(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 120rpx;

  &.hidden {
    transform: translateX(150rpx);
  }

  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100rpx;
    height: 80rpx;
    border-radius: 20rpx;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    &:active {
      transform: scale(0.92);
    }

    .tab-text {
      font-size: 20rpx;
      margin-top: 4rpx;
      color: #666;
      font-weight: 500;
    }

    &.contact-btn {
      background: linear-gradient(135deg, #455ef7 0%, #6c8dff 100%);
      box-shadow: 0 6rpx 16rpx rgba(69, 94, 247, 0.25);
      margin-top: 10rpx;

      .tab-text {
        color: #fff;
      }

      &:active {
        background: linear-gradient(135deg, #3f55e3 0%, #5d7ef0 100%);
        box-shadow: 0 4rpx 12rpx rgba(69, 94, 247, 0.2);
      }
    }
  }
}

.rtl {
  .tab-bar {
    right: auto;
    left: 0;
    border-radius: 0 30rpx 30rpx 0;
    transform: translateX(0);

    &.hidden {
      transform: translateX(-150rpx);
    }
  }
}
.fixed-back-btn {
  position: fixed;
  left: 30rpx;
  z-index: 999;
  width: 64rpx;
  height: 64rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);

  &:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 1);
  }
}
.navbar-container {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  transform: translateY(0);
  transition: all 0.3s ease;
  opacity: 1;

  .status-bar {
    width: 100%;
    background: transparent;
  }

  .navbar-content {
    height: 88rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 30rpx;
  }

  .back-btn {
    position: absolute;
    left: 30rpx;
    width: 64rpx;
    height: 64rpx;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

  .title {
    font-size: 32rpx;
    color: #333;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    opacity: var(--navbar-opacity);
  }
}
.swiper-container {
  position: relative;
  width: 100vw;
  height: 100vw;
  background: #ffffff;
  overflow: hidden;
}
.swiper {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;

  .swiper-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.thumbnail-container {
  position: absolute;
  bottom: 20rpx;
  right: 20rpx;
  display: flex;
  flex-direction: row;
  gap: 10rpx;
  z-index: 10;
  padding: 10rpx;
  border-radius: 16rpx;

  .thumbnail {
    width: 80rpx;
    height: 80rpx;
    border-radius: 12rpx;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2rpx solid transparent;
    cursor: pointer;

    &.active {
      opacity: 1;
      border-color: #ffffff;
      transform: scale(1.1);
      box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.2);
    }

    &:active {
      transform: scale(0.95);
    }
  }
}
.main {
  padding: 30rpx;
  background: #fff;
  border-radius: 30rpx 30rpx 0 0;
  margin-top: -30rpx;
  position: relative;
  z-index: 2;
  min-height: 100vh;

  .title-section {
    padding: 20rpx 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;

    .title {
      font-size: 44rpx;
      color: #333;
      font-weight: 600;
      line-height: 1.4;
      margin-bottom: 30rpx;
      display: block;
      text-align: center;
    }

    .time-info {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: #999;
      font-size: 24rpx;
    }
  }

  .basic-info,
  .contact-info {
    margin-top: 30rpx;
    padding: 20rpx;
    background: #f8f8f8;
    border-radius: 16rpx;

    .info-item {
      display: flex;
      align-items: center;
      padding: 16rpx 0;
      border-bottom: 1px solid rgba(0, 0, 0, 0.05);

      &:last-child {
        border-bottom: none;
      }

      .label {
        width: 200rpx;
        color: #666;
        font-size: 28rpx;
        padding-right: 20rpx;
      }

      .value {
        flex: 1;
        color: #333;
        font-size: 28rpx;
      }

      .qrcode {
        width: 200rpx;
        height: 200rpx;
        border-radius: 12rpx;
        margin: 10rpx 0;
      }
    }
  }

  .details-info {
    margin-top: 30rpx;
    padding: 20rpx;
    background: #f8f8f8;
    border-radius: 16rpx;

    .title {
      font-size: 32rpx;
      color: #333;
      font-weight: 600;
      margin-bottom: 20rpx;
    }

    .content {
      font-size: 28rpx;
      color: #666;
      line-height: 1.6;
    }
  }
}

// RTL نىڭ ئالاھىدە ئۇسلۇبى
.rtl {
  .basic-info,
  .contact-info {
    .info-item {
      flex-direction: row-reverse;

      .label {
        padding-right: 0;
        padding-left: 20rpx;
      }
    }
  }
}
.container {
  background: #ecf4ff;
  margin-bottom: 30rpx;
  border: 1px solid #455df716;
  border-radius: 10rpx;
  .title {
    margin: 0 20rpx;
    padding-bottom: 10rpx;
    border-bottom: 0.5px dashed #455df716;
  }
}
.contact-info {
  .info-item {
    .phone-container {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;

      .call-button {
        display: flex;
        align-items: center;
        background-color: #455ef7;
        padding: 10rpx 30rpx;
        border-radius: 30rpx;
        margin-left: 20rpx;

        .call-text {
          color: #fff;
          font-size: 24rpx;
          margin-left: 10rpx;
        }
      }
    }
  }
}

.rtl {
  .contact-info {
    .info-item {
      .phone-container {
        .call-button {
          margin-left: 0;
          margin-right: 20rpx;

          .call-text {
            margin-left: 0;
            margin-right: 10rpx;
          }
        }
      }
    }
  }
}

.share-btn {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 6rpx 16rpx rgba(34, 197, 94, 0.25);
  margin-top: 10rpx;
  position: relative;

  .share-button {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
  }

  .tab-text {
    color: #fff;
  }

  &:active {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4rpx 12rpx rgba(34, 197, 94, 0.2);
  }
}
</style>